<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
// 强大的路由文件
// 登录 =================================================
Route::get('/', function () {
	// 解析模板文件
    return view('login');
});

// 后台首页 =================================================
// Route::get('/admin', function () {
// 	// 解析模板文件
//     return view('admin/index');
// });



// 隐式路由 访问控制器 lamp.cn/cate/add
// Route::Controller('/cate','CateController');

// 后台=====================================================================

//创建后台路由组添加登录限制
//Route::group(['middleware'=>'login'],function(){
//后台用户管理
Route::Controller('/admin/user','UserController');
//后台客服中心
Route::Controller('/admin/service','QuestionController');

// //后台客服中心添加分区显示
// Route::get('/admin/service/partadd','QuestionController@partadd');

// //后台客服中心分区列表显示
// Route::get('/admin/service/partlist','QuestionController@partlist');

// //后台客服中心板块添加显示
// Route::get('/admin/service/cateadd','QuestionController@cateadd');

// //后台客服中心板块列表显示
// Route::get('/admin/service/catelist','QuestionController@catelist');

// //后台客服中心问题添加显示
// Route::get('/admin/service/cateadd','QuestionController@cateadd');

// //后台客服中心问题列表显示
// Route::get('/admin/service/catelist','QuestionController@catelist');

//后台用户路由
Route::Controller('/admin/user','UserController');

//后台商品分类路由
Route::Controller('/admin/goodscate','GoodsCateController');

// 新闻分类 
Route::Controller('/admin/pay','PayController');

// 新闻分类 
Route::Controller('/admin/cate','CateController');

// 新闻内容 
Route::Controller('/admin/news','NewsController');

// 登陆成功首页 
Route::Controller('/admin','IndexController');
//});

// 前台==================================================================================

//前台注册页面显示
Route::get('/register','LoginController@register');

//前台注册执行
Route::post('/register','LoginController@doregister');

//前台验证用户是否存在
Route::post('/register/checkuser','LoginController@checkuser');

//前台验证码验证
Route::get('/register/checkVcode','LoginController@checkVcode');

//前台注册验证码显示
Route::get('/vcode','LoginController@vcode');

//发送邮件
Route::get('/sendemail','LoginController@sendEmail');

//进行用户激活
Route::get('/jihuo','LoginController@jihuo');

//前台登录管理
Route::get('/home/login','LoginController@homelogin');

//前台登陆执行
Route::post('/home/dologin','LoginController@homedologin');

//前台充值
Route::Controller('/home/pay','HomePayController');

//个人中心
Route::Controller('/home/user','HomeUserController');

//商城
Route::Controller('/home/goods','HomeGoodsController');

//前台服务中心
Route::Controller('/home/service','ServiceController');

// 首页新闻,列表,详情
Route::Controller('/home','HomeController');

//查询充值卡面额
Route::get('/home/pay/inserta','HomePayController@inserta');

//前台退出
//Route::get('/home/loginout','LoginController@homeloginout');
// Route::Controller('/home/denglu','LoginController');

